package com.wing.product.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.common.utils.PageResult;
import com.wing.product.model.entity.WarehouseOrder;
import com.wing.product.model.response.WarehouseOrderDetailVO;
import com.wing.product.model.response.WarehouseOrderInfoDetailVO;
import com.wing.product.model.response.WarehouseOrderVO;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wing.product.model.entity.WarehouseOrderDetail;
import com.wing.product.dao.WarehouseOrderDetailDao;

import java.util.Collections;
import java.util.List;
import java.util.Map;

@Service
public class WarehouseOrderDetailServiceImpl extends ServiceImpl<WarehouseOrderDetailDao, WarehouseOrderDetail> implements WarehouseOrderDetailService{

    @Override
    public PageResult<Page<WarehouseOrderDetailVO>> pageList4app(Page<WarehouseOrderDetail> pg, Map paramMap) {
        return new PageResult<>(baseMapper.pageList4app(pg, paramMap));
    }

    @Override
    public List<WarehouseOrderInfoDetailVO> findOrderDetailListByOrderId(Long id ,String type) {
        return baseMapper.findOrderDetailListByOrderId(id ,type);
    }

    @Override
    public WarehouseOrderDetail findByOrderDetailCode(String orderCode) {
        return baseMapper.findByOrderDetailCode(orderCode);
    }
}
